//
//  AYMFamousDocView.m
//  QuickCure
//
//  Created by 徐绩 on 16/5/4.
//  Copyright © 2016年 ayumi. All rights reserved.
//

#import "AYMFamousDocView.h"

@implementation AYMFamousDocView

-(instancetype)initWithFrame:(CGRect)frame{

    if (self = [super initWithFrame:frame]) {
        [self setupUI];
    }
    return self;
}

-(void)setupUI{

    UIImageView *imageView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"yj"]];
    [imageView sizeToFit];
    [self addSubview:imageView];
    
    UILabel *label = [[UILabel alloc]init];
    label.text = @"名医通";
    label.font = [UIFont systemFontOfSize:homeFont];
    [self addSubview:label];

    UIView *lineView1 = [[UIView alloc]init];
    UIView *lineView2 = [[UIView alloc]init];
    lineView1.backgroundColor = [UIColor lightGrayColor];
    lineView2.backgroundColor = [UIColor lightGrayColor];
    [self addSubview:lineView1];
    [self addSubview:lineView2];
    
    [imageView makeConstraints:^(MASConstraintMaker *make) {
        
        make.leading.equalTo(homeMargin);
        make.centerY.equalTo(self);
    }];
    [label makeConstraints:^(MASConstraintMaker *make) {
        
        make.centerY.equalTo(imageView);
        make.leading.equalTo(imageView.leading).offset(homeMargin);
    }];
    
    [lineView1 makeConstraints:^(MASConstraintMaker *make) {
       
        make.leading.trailing.equalTo(self);
        make.bottom.equalTo(self);
        make.height.equalTo(1);
    }];
    [lineView2 makeConstraints:^(MASConstraintMaker *make) {
        
        make.leading.trailing.equalTo(self);
        make.top.equalTo(self);
        make.height.equalTo(1);
    }];
}


-(void)layoutSubviews{
    
}

@end
